<script setup>
import Menu from "@/views/Menu/Menu.vue";
import FileMenu from "@/views/FileMenu/FileMenu.vue";
import {homeStore} from "@/views/Home/home";

const home = homeStore()
// 监听全局点击事件
document.addEventListener("click", (event) => {
  const fileMenu = document.getElementById("file-menu");
  if(event.ctrlKey === false){
    for (let i = 0; i < home.tableData.length; i++) {
      if(home.tableData[i].selected === true){
        home.tableData[i].selected = false
      }
    }
  }
  fileMenu.style.display = "none";
});
</script>

<template>
  <div style="display: flex;">
    <div>
      <Menu :size="98" unit="vh"/>
    </div>
    <div style="width: 100%;">
      <RouterView/>
    </div>
  </div>

  <FileMenu id="file-menu" style="display: none;"/>
</template>

<style scoped>
* {
  margin: 0;
  padding: 0;
}
</style>
